// --------------------------------轮播图--------------------------------
function lunbotu() {
  $.ajax({
    url: 'http://localhost:8888/api/swipers',
    success: function (res) {
      if (res.status === 0) {
        let str = '';
        res.data.forEach( item => {
          str += ` <li class="img-effect">
          <a href="javascript:;">
            <img src="http://localhost:8888/uploads/${item.swiperimg}" alt="">
          </a>
        </li>`
        });
        $('#lunbotu').html(str);
      }
    }
  });
};
lunbotu();

// ------------------------------友情链接列表-----------------------------------
function youqing() {
  $.ajax({
    url: 'http://localhost:8888/api/links',
    success: function (res) {
      if (res.status === 0 ) {
        let str = '';
        res.data.forEach( item => {
          str += ` <dd>
          <a href="${item.linkurl}">
            <img src="${'http://localhost:8888/uploads/' + item.linkicon}" alt="${item.linkname}">
          </a>
        </dd>`
        });
        $('.kr_collaborator').html(str);
      }
    }
  })
};
youqing();